package main

import "fmt"

type Person struct {
	Name string
	Age  int
}

type Student struct {
	Person
	Name  string
	Class string
}

func main() {
	stu := Student{
		Person: Person{Name: "per", Age: 27},
		Name:   "stu",
		Class:  "三年一班",
	}
	fmt.Println(stu)

	person := Person{Name: "per", Age: 27}
	stu2 := Student{
		Person: person,
		Name:   "stu",
		Class:  "三年一班",
	}
	fmt.Println(stu2)

	fmt.Println(stu == stu2) // true

}
